//
//  Except.m
//  XPhoto
//
//  Created by baboy on 2021/6/22.
//  Copyright © 2021 baboy. All rights reserved.
//

#import "Except.h"
#import <BKKit/BKApi.h>
#import "HttpResponse.h"

@implementation Except

+ (id)uploadException:(NSString *)except
            callback:(nullable void (^)(id _Nonnull task, id _Nullable json,  NSError * _Nullable error))callback{
    
    id param = @{@"content": except};
    return [BKApi request: API_EXCEPT_UPLOAD
             parameters: param
               callback:^(id  _Nonnull task, id  _Nullable json, NSError * _Nullable error) {
                   if (!error && json) {
                       HttpResponse *response = [HttpResponse responseWithDictionary:json];
                       if ([response isSuccess]) {
                           [BKIndicator showTips:@"异常" duration:3.0f completion:nil];
                       }
                   }
        if(callback){
            callback(task, json, error);
        }
               }];
}
@end
